using Cysharp.Threading.Tasks;
using UnityEngine;

namespace MoonFramework.Buff
{
    public class RecoverHpBuff : BaseBuff
    {
        public override void Enter()
        {
            base.Enter();
            RecoverHp().Forget();
        }

        private async UniTaskVoid RecoverHp()
        {
            while (BuffTime > 0)
            {
                
                BuffTime -= Time.deltaTime;
                await UniTask.Yield(PlayerLoopTiming.Update);
            }
        }
    }
}